﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Komunikator.Core;

namespace Komunikator
{
    /// <summary>
    /// Interaction logic for LoginWindow.xaml
    /// </summary>
    public partial class LoginWindow : Window
    {
        public LoginWindow()
        {
            InitializeComponent();
        }

        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            if (NumberTextbox.Text != "" && PasswordBox1.Password != "")
            {
                HttpConnector connector = new HttpConnector();
                HttpConnector.ggNumber = Int32.Parse(NumberTextbox.Text);
                HttpConnector.ggPassword = PasswordBox1.Password;
                connector.CreateMessage(Int32.Parse(NumberTextbox.Text));
                this.Close();
            }
            


        }

    }
}
